import { Button, Card, Table, Tag } from 'antd';

type Row = { id: string; name: string; teacher: string; credit: number };
const data: Row[] = [
  { id: 'a-1', name: '机器学习', teacher: '赵教授', credit: 3 },
  { id: 'a-2', name: '云计算', teacher: '钱教授', credit: 2 },
  { id: 'a-3', name: '数据挖掘', teacher: '孙教授', credit: 3 },
];

export default function Approvals() {
  return (
    <Card title="课程审批">
      <Table<Row>
        rowKey="id"
        dataSource={data}
        columns={[
          { title: '课程名称', dataIndex: 'name' },
          { title: '任课教师', dataIndex: 'teacher' },
          { title: '学分', dataIndex: 'credit', render: (v) => <Tag color="blue">{v} 学分</Tag> },
          { title: '操作', render: () => (
            <>
              <Button type="link">通过</Button>
              <Button type="link" danger>驳回</Button>
            </>
          ) },
        ]}
        pagination={false}
      />
    </Card>
  );
}


